package com.danicsoft.daide.binary;

/**
 * An interface for a class that wishes to parse byte diplomatic messages
 * recieved.
 * 
 * @author Daniel Yule (daniel.yule@gmail.com)
 * @version 1.0
 */
public interface ByteMessageHandler {

	/**
	 * Handle a diplomatic message recieved from the other side.
	 * 
	 * @param message
	 *        The message as a series of bytes.
	 */
	public void handleMessage(byte[] message);
	
	/**
	 * Sets the representation message to be used.
	 * @param RM The RM message encoded as bytes
	 */
	public void setRM(byte[] RM);

	/**
	 * Get the representation message that this parser will be using.
	 * 
	 * @return The representation message for this parser as a byte array.
	 */
	public byte[] getRM();
	
	/**
	 * Set the connection that is associated with this handler
	 * @param conn The connection to associate.
	 */
	public void setConnection(Connection conn);
}
